home *** CD-ROM | disk | FTP | other *** search
- .********************************************************
- :userdoc.
- :docprof toc=123.
- :title.Apple Set for OS/2 PM
- .******************************************
- :h1 res=100. Information
- :p.
- The apple set is a fractal in the complex plane, generated by the following
- iteration
- :xmp. z_0=c, z_{n+1}=z_{n}^2+c.
- :exmp.
- :artwork align=left name='apple.bmp'.
- The point c belongs to the apple set, if the above defined sequence is
- bounded. This program draws the apple set and lets the user magnify
- with a rubber band. As a criterion, we use
- :xmp. |z_n| >= 16.
- :exmp.:p.
- If this happens for n<=N, then we assume that c is not in the apple set.
- The number of iterations N can be adjusted in a dialog. Since points close
- to the apple set will have a small n, where the iterations stops, this
- stopping n is used to color the point. By the way, the color is connected
- to the potential of the apple set at c.
- :artwork align=left name='apple1.bmp'.
- The program will determine the color for any pixel of the window. A black
- color means that the point belongs to the apple set.
- :p.
- Further Information&colon.
- :ul compact.
- :li. :link reftype=hd res=200.About the Author:elink.
- :li. :link reftype=hd res=300.Implementation Remarks:elink.
- :eul.
- .*******************************************
- :h1 res=200. About the Author
- :p.
- The main purpose of the program was to gain knowledge about PM programming.
- Programming has been done in C++ using an own class library. The source is
- included.
- :p.
- For suggestions, write to
- :xmp.
- Dr. R. Grothmann
- Kath. Univ. Eichstätt
- 85072 Eichstätt
- Germany
-
- EMail: rene.grothmann@ku-eichstaett.de
- :exmp.:p.
- .********************************************
- :h1 res=300. Implemation Remarks
- :p.
- There are several ways to implement a long painting job like this one.
- :p.
- (1) Direct painting to the screen. Then the screen would have to be
- updated on any redraw message. This is out of discussion.
- :p.
- (2) Use of a bitmap. Simultaneously draw to the bitmap and the screen.
- This locks the screen for the time of the drawing.
- :p.
- (3) The Bitmap is drawn in a separate thread and updates the screen
- every now and then. That is the approach of this little program.
- :p.
- I used an own class library. It contains just enough to get through
- with this job. I hope to have the time to extend it in the future.
- .********************************************
- :euserdoc.